<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        caption {
            font-size: 20px;
            font-weight: bold;
        }

        table {
            border-collapse: collapse;
            margin: 0 auto;
            text-align: center;
            height: 80px;
        }

        th {
            padding: 5px 20px;
        }



        table,
        th,
        td {
            border: 1px solid black;
        }
    </style>
</head>

<body>

    <script>
        let price = +prompt('价格')
        let num = +prompt('金额')
        let address = prompt('地址')
        let sum = price * num

        document.write(`
        <table>
        <caption>订单确认</caption>
        <thead>
            <tr>
                <th>商品名称</th>
                <th>商品价格</th>
                <th>商品数量</th>
                <th>总价</th>
                <th>收获地址</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>小米plus</td>
                <td>${price}元</td>
                <td>${num}</td>
                <td>${sum}元</td>
                <td>${address}</td>
            </tr>
        </tbody>
    </table>
    `)
    </script>
</body>

</html>